package com.akcome.apollo.domain;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 短信记录
 *
 * @author SDD
 * @version $v: 1.0.0, $time:2015-09-29 15:57:00 Exp $
 */
@Entity
@Table(name = "bmp_sms_info")
public class BmpSmsInfo implements Serializable {

    /** 主键 **/
    private Long id;

    /** 业务类型[01-验证码] **/
    private String businessType;

    /** 用户ID **/
    private Long userId;

    /** 国际电话区号(见字典CALL_CODE) **/
    private String callCode;
    
    /** 手机 **/
    private String mobile;

    /** 短信内容 **/
    private String msg;

    /** 发送状态[0-待发送, 1-成功, 2-发送失败,  3-发送中] **/
    private String status;

    /** 发送的ip **/
    private String ip;

    /** 创建时间 **/
    private Date createTime;

    /** 错误代码 **/
    private String errorCode;

    /** 错误描述 **/
    private String errorMsg;

    /** 来源(见字典SOURCE) **/
    private String source;


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "business_type", length = 2)
    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    @Column(name = "user_id", length = 11)
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
    @Column(name = "call_code", length = 11)
    public String getCallCode() {
		return callCode;
	}

	public void setCallCode(String callCode) {
		this.callCode = callCode;
	}

	@Column(name = "mobile", length = 11)
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Column(name = "msg", length = 200)
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Column(name = "status", length = 1)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(name = "ip", length = 40)
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Column(name = "error_code", length = 100)
    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    @Column(name = "error_msg", length = 200)
    public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	@Column(name = "source", length = 2)
    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

}
